package com.ruoyi.business.seaTotal.controller;

import org.python.util.PythonInterpreter;

/**
 * @author ligguozhen
 * @Description
 * @date 2024-11-12 9:08
 */
public class PythonController {
    public static void main(String [] args){
        PythonInterpreter interpreter = new PythonInterpreter();
//        interpreter.exec("import math");
//        interpreter.exec("result = math.sqrt(16)");
//        interpreter.exec("print(result)");
//        interpreter.exec("print('This is a JPython text')");
//        interpreter.exec("print(2+3)");
        //interpreter.execfile("ruoyi-admin/src/main/java/com/ruoyi/business/seaTotal/pydos/es.py");
        interpreter.exec("import pandas as pd");
        interpreter.exec("df = pd.read_excel('ruoyi-admin/src/main/java/com/ruoyi/business/seaTotal/pydos/异常-PC1系数.xlsx')");
        interpreter.exec("print(df)");


    }
}
